<%--
Document   : main
Created on : 2014-3-18, 19:39:56
Author     : Vincent
--%>
<%@ page isELIgnored="false"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>论坛</title>
<link rel="shortcut icon" href="<%=basePath%>Images/favicon.ico" />
<script type="text/javascript" src="<%=basePath%>plugins/jQuery/jQuery.js"></script>
<script type="text/javascript" src="<%=basePath%>basic/basic.js"></script>
<link rel="stylesheet" type="text/css" href="<%=basePath%>basic/basic.css" />

<link rel="stylesheet" type="text/css" href="<%=basePath%>CSS/index.css" />
<script type="text/javascript" src="<%=basePath%>JS/index.js"></script>
</head>
<body>
	<div class="frame">
		<jsp:include page="../head.jsp"></jsp:include>
		<div class="main_p2">
			<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">
				<tr>
					<td width="460">
						<table cellpadding="0" cellspacing="0" border="0" width="100%" height="100%">
							<tr>
								<td width="340">
									<div class="main_p3">
										<input type="text" value="搜帖子" />
									</div>
								</td>
								<td><input type="button" class="main_p4" value="搜索" /></td>
							</tr>
						</table>
					</td>
					<td>
						<table>
							<tr style="font-size: 15px;">
								<td>热搜：</td>
								<td>
									<ul class="main_p5">
										<li>123</li>
										<li>123</li>
										<li>123</li>
									</ul>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</div>
		<div style="border: 0px solid red;margin-top: 10px;margin-bottom: 10px;">
			<table cellpadding="0" cellspacing="0" border="0" width="300px"
				style="text-align: center;border: 1px solid lightgray"
			>
				<tr>
					<td>今日</td>
					<td>昨日</td>
					<td>帖子</td>
					<td>会员</td>
				</tr>
				<tr>
					<td>1</td>
					<td>2</td>
					<td>3</td>
					<td>4</td>
				</tr>
			</table>
		</div>
		 <c:forEach items="${requestScope.indexSubjects }" var="subject">
			<div class="main_p6">
				<div class="main_p6_1">
					<div style="color: #1170b2;float: left;">&nbsp;&nbsp;&nbsp;&nbsp;${subject.title}</div>
					<div class="main_p6_1_1" flag='open'></div>
					<div style="color: #1170b2;float: right;font-size: 13px;margin-right: 20px;">分栏版主：<span userid=${subject.user.id}>${subject.user.nickName}</span></div>
				</div>
				<div style="clear: both;"></div>
				<ul class="main_p6_2">
					<c:forEach items="${subject.subjects}" var="subjectChild">
						<li>
							<table cellpadding="0" cellspacing="0" border="0" width="90%" height="100%" style="text-align: left;font-size: 15px;">
								<tr>
									<td colspan="2" style="font-weight: bold"><span subjectid=${subjectChild.id }>${subjectChild.title }</span></td>
								</tr>
								<tr style="font-size: 14px;color:rgb(50,50,50)">
									<td>帖子：${fn:length(subjectChild.topics)}</td>
									<td>回帖：${fn:length(subjectChild.posts)}</td>
								</tr>
								<tr style="color:rgb(100,200,200)">
									<td colspan="2">
										<div style="width:180px;white-space:nowrap;word-break:keep-all;overflow:hidden;text-overflow:ellipsis;">${subjectChild.topics[fn:length(subjectChild.topics)-1].title }</div>
									</td>
								</tr>
							</table>
						</li>
					</c:forEach>
					<div style="clear: both;"></div>
				</ul>
			</div>
		</c:forEach> 
	</div>

</body>
</html>
